package com.kehutong.contact.entity;

import com.kehutong.common.entity.DataEntity;
import com.kehutong.contact.enums.AuditStatus;
import com.kehutong.contact.enums.HouseType;
import com.kehutong.contact.enums.RelationType;
import com.kehutong.contact.enums.ResidentType;
import org.coraframework.bean.valid.CheckField;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 住户房屋绑定申请
 * @author: liukunlong
 * @date: 2021-03-30 09:57
 */
@Table(value = "t_resident_house_bind_apply", comment = "住户房屋绑定申请",multi = true)
public class ResidentHouseBindApply extends DataEntity {
    private static final long serialVersionUID = -204131018664727070L;
    protected ResidentHouseBindApply(String id) {
        super(id);
    }

    @CheckField("住户编号不能为空")
    @Column(comment = "住户编号")
    private String residentNo;

    @Column(comment = "房屋类型")
    private HouseType houseType;

    @Column(comment = "申请人姓名")
    private String realname;

    @CheckField("申请人手机号不能为空")
    @Column(comment = "申请人手机号")
    private String mobile;

    @Column(comment = "账号手机号")
    private String accountMobile;

    @CheckField("申请人身份不能为空")
    @Column(comment = "申请人身份")
    private ResidentType type;

    @Column(comment = "与业主关系")
    private RelationType relationType;

    @Column(comment = "所属上级")
    private String pid;

    @Column(comment = "所属上级名称")
    private String pname;

    @Column(comment = "租赁开始时间")
    private LocalDateTime startTime;

    @Column(comment = "租赁结束时间")
    private LocalDateTime endTime;

    @Column(comment="小区编号")
    private String communityNo;

    @Column(comment="小区名称")
    private String communityName;

    @Column(comment = "小区别名")
    private String communityViewName;

    @Column(comment="楼栋编号")
    private String buildNo;

    @Column(comment="楼栋名称")
    private String buildName;

    @Column(comment = "楼栋别名")
    private String buildViewName;


    @Column(comment="单元名称")
    private String unitName;

    @Column(comment="楼层名称")
    private String floorName;

    @CheckField("房屋编号不能为空")
    @Column(comment = "房屋编号")
    private String houseNo;

    @CheckField("房屋名称不能为空")
    @Column(comment = "房屋名称")
    private String houseName;

    @Column(comment = "房屋别名")
    private String houseViewName;


    @Column(comment = "审核状态")
    private AuditStatus status;

    @Column(comment = "审核人编号(业主住户编号(账号编号)或者后台审核员工编号)")
    private String auditNo;

    @Column(length = 255, comment = "审核人头像")
    private String auditAvatar;

    @Column(comment = "审核人名称")
    private String auditName;

    @Column(comment = "审核时间")
    private LocalDateTime auditTime;

    @Column(length = 400,comment = "审核备注")
    private String auditRemarks;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;


    @Column(length = 255, comment = "头像")
    private String avatar;

    @Column(comment = "公司编号")
    private String companyNo;

    /**
     * 二维码分享业主编号
     */
    private String ownerNo;


    /***
     * 验证码
     */
    private String code;

    //管家编号
    @UnSave
    private List<String> employeeNos;

    //管家名称
    @UnSave
    private List<String> employeeNames;

    public String getResidentNo() {
        return residentNo;
    }

    public void setResidentNo(String residentNo) {
        this.residentNo = residentNo;
    }

    public ResidentType getType() {
        return type;
    }

    public void setType(ResidentType type) {
        this.type = type;
    }

    public String getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(String communityNo) {
        this.communityNo = communityNo;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public String getBuildNo() {
        return buildNo;
    }

    public void setBuildNo(String buildNo) {
        this.buildNo = buildNo;
    }

    public String getBuildName() {
        return buildName;
    }

    public void setBuildName(String buildName) {
        this.buildName = buildName;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getHouseNo() {
        return houseNo;
    }

    public void setHouseNo(String houseNo) {
        this.houseNo = houseNo;
    }

    public String getHouseName() {
        return houseName;
    }

    public void setHouseName(String houseName) {
        this.houseName = houseName;
    }

    public AuditStatus getStatus() {
        return status;
    }

    public void setStatus(AuditStatus status) {
        this.status = status;
    }

    public String getAuditNo() {
        return auditNo;
    }

    public void setAuditNo(String auditNo) {
        this.auditNo = auditNo;
    }

    public String getAuditName() {
        return auditName;
    }

    public void setAuditName(String auditName) {
        this.auditName = auditName;
    }

    public LocalDateTime getAuditTime() {
        return auditTime;
    }

    public void setAuditTime(LocalDateTime auditTime) {
        this.auditTime = auditTime;
    }

    public String getAuditRemarks() {
        return auditRemarks;
    }

    public void setAuditRemarks(String auditRemarks) {
        this.auditRemarks = auditRemarks;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public HouseType getHouseType() {
        return houseType;
    }

    public void setHouseType(HouseType houseType) {
        this.houseType = houseType;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public RelationType getRelationType() {
        return relationType;
    }

    public void setRelationType(RelationType relationType) {
        this.relationType = relationType;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getOwnerNo() {
        return ownerNo;
    }

    public void setOwnerNo(String ownerNo) {
        this.ownerNo = ownerNo;
    }

    public String getFloorName() {
        return floorName;
    }

    public void setFloorName(String floorName) {
        this.floorName = floorName;
    }

    public String getCommunityViewName() {
        return communityViewName;
    }

    public void setCommunityViewName(String communityViewName) {
        this.communityViewName = communityViewName;
    }

    public String getBuildViewName() {
        return buildViewName;
    }

    public void setBuildViewName(String buildViewName) {
        this.buildViewName = buildViewName;
    }

    public String getHouseViewName() {
        return houseViewName;
    }

    public void setHouseViewName(String houseViewName) {
        this.houseViewName = houseViewName;
    }

    public String getAuditAvatar() {
        return auditAvatar;
    }

    public void setAuditAvatar(String auditAvatar) {
        this.auditAvatar = auditAvatar;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<String> getEmployeeNos() {
        return employeeNos;
    }

    public void setEmployeeNos(List<String> employeeNos) {
        this.employeeNos = employeeNos;
    }

    public List<String> getEmployeeNames() {
        return employeeNames;
    }

    public void setEmployeeNames(List<String> employeeNames) {
        this.employeeNames = employeeNames;
    }

    public String getAccountMobile() {
        return accountMobile;
    }

    public void setAccountMobile(String accountMobile) {
        this.accountMobile = accountMobile;
    }

    @Override
    public String toString() {
        return "ResidentHouseBindApply{" +
            "residentNo='" + residentNo + '\'' +
            ", houseType=" + houseType +
            ", realname='" + realname + '\'' +
            ", mobile='" + mobile + '\'' +
            ", accountMobile='" + accountMobile + '\'' +
            ", type=" + type +
            ", relationType=" + relationType +
            ", pid='" + pid + '\'' +
            ", pname='" + pname + '\'' +
            ", startTime=" + startTime +
            ", endTime=" + endTime +
            ", communityNo='" + communityNo + '\'' +
            ", communityName='" + communityName + '\'' +
            ", communityViewName='" + communityViewName + '\'' +
            ", buildNo='" + buildNo + '\'' +
            ", buildName='" + buildName + '\'' +
            ", buildViewName='" + buildViewName + '\'' +
            ", unitName='" + unitName + '\'' +
            ", floorName='" + floorName + '\'' +
            ", houseNo='" + houseNo + '\'' +
            ", houseName='" + houseName + '\'' +
            ", houseViewName='" + houseViewName + '\'' +
            ", status=" + status +
            ", auditNo='" + auditNo + '\'' +
            ", auditAvatar='" + auditAvatar + '\'' +
            ", auditName='" + auditName + '\'' +
            ", auditTime=" + auditTime +
            ", auditRemarks='" + auditRemarks + '\'' +
            ", deleted=" + deleted +
            ", avatar='" + avatar + '\'' +
            ", companyNo='" + companyNo + '\'' +
            ", ownerNo='" + ownerNo + '\'' +
            ", code='" + code + '\'' +
            ", employeeNos=" + employeeNos +
            ", employeeNames=" + employeeNames +
            '}';
    }
}
